Skip to content

fix(hooks): map the subagent veto to the payloads lich measured, and keep the task out of argv - #109

Merged
omartelo merged 1 commit into
mainfrom
fix/veto-measured-payloads
Nov 23, 2026
Merged

omartelo merged 1 commit into
mainfrom
fix/veto-measured-payloads

Conversation

@omartelo

Copy link
Copy Markdown
Collaborator

Follow-up on #108, from the payloads lich measured on 2026-11-22.

  • Antigravity: toolCall.id is now sent as tool_use_id, not "".
  • Kiro CLI: use_subagent is taken only with command: "InvokeSubagents" and its content.subagents[].query, as measured; the unmeasured fallbacks (a top-level subagents, a missing command) are dropped. The ACP subagent mapping was already right.
  • Cursor CLI: the claude mode already reads its tool_use_id, tool_input and session_id; the test payload is now Cursor's measured shape, an id with a newline in it included.
  • hooks/veto-subagent.sh feeds curl the body on stdin (--data-binary @-) and the token header through a config on fd 3, so neither the task prompt nor the token is a process argument while the hook waits.
  • docs/subagent-cards.md: what is measured now, and what is still not (tool_use_id on Codex and Crush, omp's context join, Windows).

Test plan

  • node --test tests/*.test.mjs: 501 pass, with the measured payloads for Antigravity, Kiro (ACP and classic) and Cursor, and a recording curl, printf and jq asserting the task and the token appear in no command line.

…keep the task out of argv

Antigravity's call id is toolCall.id, now sent as tool_use_id. Kiro's
use_subagent is taken only with command InvokeSubagents and its subagents under
content, as measured; the unmeasured fallbacks are gone. The body reaches curl
on stdin and the token through a config on fd 3, so a task prompt is no longer
visible in the process list while the hook waits.
@omartelo
omartelo merged commit b789d96 into main Nov 23, 2026
2 checks passed
@omartelo omartelo mentioned this pull request Nov 23, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant